# -*- coding: utf-8 -*-
# @Author : HaleShi
# @Time : 2023-06-16
# @File : 2.1.frida更换端口.py

import frida
import sys

str_host = "127.0.0.1:8877"
manager = frida.get_device_manager()
rdev = manager.add_remote_device(str_host)
session = rdev.attach("com.che168.autotradercloud")

scr = """
Java.perform(function () {
    console.log("加载");
});
"""
script = session.create_script(scr)


def on_message(message, data):
    print(message, data)


script.on("message", on_message)
script.load()
sys.stdin.read()